export interface GoodsModel {
  id: number;
  status: "public" | "private" | "delete";
  intro: string;
  plan: "buy" | "free";
  price: number;
  tags: string[];
  title: string;
  preview: FileModel[];
  like_count: number; //点赞数
  liked_id: number | null; //当前登录用户点赞id
  collected_id: number | null; //当前登录用户收藏id
  uid: number; //商品发布者
  user?: UserModel;
  files?: FileModel[]; //未支付就没有
  locked: boolean; //是否需要支付
  create_at: string;
}

export interface UserModel {
  id: number;
  nickname: string;
  account: string;
  avatar: string | null;
  intro: string;
}

export interface FileModel {
  lastModified: number;
  name: string;
  size: number;
  type: string;
  uid: string;
  url: string;
  percent: number;
  status: string;
}

export interface OrderModel {
  id: number;
  uid: number; //购买者
  gid: number;
  g_uid: number; //商品发布者
  status: "unpaid" | "paid";
  amount: number;
  number: string;
}

export interface CommentModel {
  content: string;
  create_at: string;
  id: number;
  parentId: string | null;
  toUser: UserModel | null;
  goodsId: number;
  user: UserModel;
  userId: number;
  replys: CommentModel[];
}

export interface StatsModel {
  uid: number;
  income: number; //当前总收入
  unCashout: number; //当前未提现
}

export interface CashoutModel {
  id: number;
  after_balance: string;
  amount: string;
  create_at: string;
  mark: string;
  pre_balance: string;
  status: "progress" | "complete" | "reject";
  uid: number;
}
